Repository navigation
fix(database): drop the join-without-index rules - #1255
Conversation
|
Thanks for your patch 👍 Is my understanding correct that the warning/notice isn't useful because the admin cannot act on it? The query that joins without an index isn't logged by default, so the admin can't tell which one it is. And even if they found it, adding the index manually would make our schema checker report it as an unexpected index. If that's the case, I would suggest updating this PR to remove both |
d272da8 to
61ba92b
Compare
Select_full_join and Join_without_index_rate cannot be acted on by an admin: - The queries behind the counters are not logged by default, so there is no way to tell which query did the join. - Most of them are Nextcloud's own: the core setup checks introspect the schema through information_schema, whose tables have no indexes, so every visit of Administration -> Overview adds to Select_full_join. - Even if the query were known, adding an index by hand would make the schema check report it as unexpected. Remove both rules, as suggested in review. Fixes nextcloud#1245 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TNUHUT6jaQ3BHvjvdf4Ny Signed-off-by: Phillipxh <150742483+Phillipxh@users.noreply.github.com>
61ba92b to
53374c2
Compare
|
Thanks for the review, @kesselb! Yes, that's exactly it: the queries aren't logged by default, most of the full joins come from the core setup checks' own I've updated the PR to remove both |
|
/backport to stable35 please |
Select_full_joinwarning is caused by the setup checks' own schema introspection #1245Summary
Select_full_joinandJoin_without_index_ratecan't be acted on by an admin, so this removes both rules (as suggested in review):information_schema, whose tables have no indexes. Every visit of Administration → Overview adds 12 toSelect_full_join(see the analysis in Database checks:Select_full_joinwarning is caused by the setup checks' own schema introspection #1245), so on a small instance just looking at the page makes the check fail.Changes:
RuleSet\MysqlAdvisor::COUNTER_SENSITIVE_RULE_IDSAdvisorTest::testJoinWithoutIndexRateIsANotice(and the now unusedRuleimport)Seen on Nextcloud 35.0.1, serverinfo 7.0.0, MariaDB 10.11 (Debian 12), all
occ db:add-missing-*checks clean.Checklist
AI (if applicable)
Assisted-bytrailer on the commit)🤖 Generated with Claude Code
https://claude.ai/code/session_019TNUHUT6jaQ3BHvjvdf4Ny